<%--
 *  @Author: Kevinfan
 *  Date:    2010/12/23
 *
 *  Copyright (C) 2000 - 2001 Oval Technologies, Inc.
 *  All rights reserved.
 *
 *  This software is the confidential and proprietary information of Oval
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>


<%@ include file="/inc/SessionTimeout.inc"%>
<%@ page language="java" %>     
<%@ page import="java.util.*" %>
<%@ page import="org.apache.log4j.Category" %>
<%@ page contentType = "text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>

<%
  //init param
  Category cat = Category.getInstance("jsp.JobInfo");
  String strModuleName = "ERM";
  String privilegeCode = "10340";
  String contextPath = request.getContextPath();
  HashMap userinfo = (HashMap)session.getAttribute("userinfo");
%>
<%@ include file="/inc/Security.inc" %>
<%@ include file="/inc/PageDefault.inc" %>
<%@ include file="/inc/LocationDefault.inc" %>

<html>
<head>
<title>DoctorEdit</title>
<PageFlow:CheckPageFlow pageName="p_doctoredit"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="<%=contextPath %>/css/<%= strLanguageCode %>/main.css" type="text/css">
<script language="JavaScript" src="<%=request.getContextPath() %>/js/jquery-1.3.2.min.js"></script>
<script language="JavaScript" src="<%=contextPath %>/js/ScriptLib.js"></script>
<script language="JavaScript" src="<%=contextPath %>/js/Calendar.js"></script>

<%@ include file="/inc/SummaryDivision.inc" %>
<script language="JavaScript">


function page_done()
{
  if(!checkForm(document.cform))
    return;
  formatCheckBox(cform);
  document.cform.target = "_self";
  document.cform.actionname.value = "save"
  //isRunning = true;
  __submitData("pageform",true);
}

function page_ck(obj) 
{
	if(obj.value!=""){
		if (obj.value.substr(obj.value.length-1)!= '%' || isNaN(Number(obj.value.substring(0,obj.value.length-1)))) 
		{
			alert( '请输入百分数 !如:30%'); 
			obj.focus();
		}
	}
}
<%
String strDisplayFlag="";
if(request.getParameter("displayflag")!=null)
{
  strDisplayFlag=request.getParameter("displayflag");
}
%>
function page_selectProdGroup() {
	var doctorid =$('input[name=doctorid]').val();
	
	var hpid =$('input[name=hpid]').val();


	var status = "height=500, width=600,top=200,left=200,toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, status=no";
	<%if(!(strDisplayFlag).equals("view")){%>
	var url = "<%=contextPath %>/phap/masterdata/erm/ProductGroupSummaryFrm.jsp?<%= OvalTools.randomURL() %>&doctorid=" + doctorid +"&hpid="+hpid;
	<%}else{ %>
	var url = "<%=contextPath %>/phap/masterdata/erm/ProductGroupSummaryFrm.jsp?<%= OvalTools.randomURL() %>&doctorid=" + doctorid +"&hpid="+hpid+'&displayflag=view';
	<%} %> 
	if (typeof popwindow1 != 'undefined') popwindow1.close();
	popwindow1 = window.open(url, "newwindow1", status);
}
</script>
</head>
<iframe name="reloadHandler" style="display:none" ></iframe>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td class="summary_top"></td>
  </tr>
</table>
<table width="100%" cellspacing="0" cellpadding="0" >
<form id="pageform"  name="cform" method="post" action="../../../Dispatcher" target="_self">
<input type="hidden" name="pagename" value="p_doctoredit">
<input type="hidden" name="actionname" value="">
<custom:hidden name="doctorinfo" property="doctorid"/>
<custom:hidden name="doctorinfo" property="doctorname"/>
<custom:hidden name="doctorinfo" property="hpid"/>
  <tr> 
    <td valign="top"> 
        <table border="1" cellspacing="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" align="center" width="100%" cellpadding="1">
		<%if(!(strDisplayFlag).equals("view")){%>
          <tr>
            <td colspan="4" class="td_right"><a onclick="page_done();"><custom:button type="2" label="L_Save" imgsrc="save_btn.gif" border="0"/></a></td>
          </tr>
		  <%}%>
          <tr> 
          <!--
            <td class="need" width="15%"><%= label.getLabelName("L_Departments") + label.getLabelName("L_Colon") %></td>
            <td width="35%">
            	
            	<custom:selectdic name="doctorinfo" dictType="HospitalDepartment" property="department" defaultValue="------" command="notnull" defaultValueCost=" " label="L_Departments"/>
            
            	<custom:select property="department" name="doctorinfo" optionsName="alldeptnames" optionValueKey="hospitaldeptid" optionInnerTextKey="deptname" defaultValue="-------------" defaultValueCost=" " command="notnull"  label="L_Departments"></custom:select>
            </td>
           -->
			<td class="td-text" ><%= label.getLabelName("L_ProductGroup") + label.getLabelName("L_Colon") %></td>
            <td>  
            	<a onclick="page_selectProdGroup()"><custom:button type="2" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
           
            </td>
             		  	<td class="td-text"><%= label.getLabelName("L_IsHospitalDrugAssociationMmber") + label.getLabelName("L_Colon") %></td>
          	<td>
          		<custom:selectdic name="doctorinfo" dictType="YesOrNo" property="ismedicalcouncilmember" label="L_IsHospitalDrugAssociationMmber" defaultValue="------" defaultValueCost=" "/>
            </td>
          </tr>
          <tr>
            <td class="td-text" width="15%"><%= label.getLabelName("L_ProfessionalTitle") + label.getLabelName("L_Colon") %></td>
            <td width="35%">
            	<custom:selectdic name="doctorinfo" dictType="DoctorJobGrade" property="jobgrade" defaultValue="-----------------"  defaultValueCost=" " label="L_ProfessionalTitle"/>
            </td>
			<td class="td-text" width="15%"><%= label.getLabelName("L_AdministrativeRank") + label.getLabelName("L_Colon") %></td>
            <td width="35%">
				<custom:selectdic name="doctorinfo" dictType="DoctorJobTitle" property="jobtitle" label="L_AdministrativeRank" defaultValue="----------------------" defaultValueCost=" "/>
			</td>
            
          </tr>
          <tr>
            <td class="td-text"><%= label.getLabelName("L_DoctorClinicNum") + label.getLabelName("L_Colon") %></td>
            <td><custom:text property="outpatientqty" name="doctorinfo" command="notnegative" dataType="number" label="L_DoctorClinicNum"/></td>
			<td class="td-text"><%= label.getLabelName("L_SickbedNum") + label.getLabelName("L_Colon") %></td>
            <td>
            	<custom:text property="sickbed" name="doctorinfo" command="notnegative" dataType="number" label="L_SickbedNum"/>
            </td>
            
          
          </tr>
          <tr>
            <td class="need"><%= label.getLabelName("L_IsOrNotExpert") + label.getLabelName("L_Colon") %></td>
            <td>
            	<custom:selectdic name="doctorinfo" dictType="YesOrNo" property="ismanagementstaff" label="L_IsOrNotExpert" command="notnull" defaultValue="------" defaultValueCost=" "/>
		    </td>
		    <td class="td-text"><%= label.getLabelName("L_ClinicTime") + label.getLabelName("L_Colon") %></td>
          	<td>
             <custom:text property="consultingtime" dataType="date" name="doctorinfo" dataFormatName="dateformat" size="20"  label="L_ClinicTime" onfocus="c.show(this,'cform.consultingtime','yyyy-MM-dd')" />
          		
            </td>
            
          </tr>
          <tr>
            <td class="td-text"><%= label.getLabelName("L_WorkStatus") + label.getLabelName("L_Colon") %></td>
            <td>
            	<custom:selectdic name="doctorinfo" dictType="WorkStatus" property="workstatus" label="L_WorkStatus" defaultValue="--------------" defaultValueCost=" "/>
		    </td>
			<td class="td-text"><%= label.getLabelName("L_Multydruglevel") + label.getLabelName("L_Colon") %></td>
          	<td><custom:selectdic dictType="Level"  property="multydruglevel" name="doctorinfo" label="L_Multydruglevel" defaultValue="---------"/></td>
          	
          </tr>
   		  <tr>
			<td class="td-text"><%= label.getLabelName("L_AttendedTime") + label.getLabelName("L_Colon") %></td>
          	<td>
          	<custom:text property="dutytime" dataType="date" name="doctorinfo" dataFormatName="dateformat" size="20"  label="L_AttendedTime" onfocus="c.show(this,'cform.dutytime','yyyy-MM-dd')" />
          	</td>
          	 <td class="td-text">&nbsp;</td>
          	<td>&nbsp;</td>
   		  </tr>
        </table>
      </td>
  </tr>
  <tr>
    <td class="summary_top"></td>
  </tr>
  <tr>
    <td class="td_center">
	  <a onclick="__back()"><custom:button type="2" label="L_Back" imgsrc="delete.gif" border="0" style="width:60"/></a>
    </td>
  </tr>
</form>
</table>
</body>


<script>
  var list=document.getElementsByTagName("input");
  m=list.length
  list[m-1].style.display='none';
</script>
</html>